@extends('admin.public.layout')
@section('title', '修改管理员')

@section('css')

@endsection

@section('content')
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header"><h4>修改管理员</h4></div>
                <div class="card-body">
                    <form action="{{url('admin/admin/edit')}}" method="post">
                        <input type="hidden" id="id" name="id" value="{{$item['id']}}"/>
                        <div class="form-group">
                            <label for="example-text-input"><span style="color:red;">*</span>&nbsp;用户名</label>
                            <input class="form-control" type="text" name="name" placeholder="请输入用户名" value="{{$item['admin_name']}}" max="20" readonly>
                        </div>
                        <div class="form-group">
                            <label for="example-text-input"><span style="color:red;">*</span>&nbsp;姓名</label>
                            <input class="form-control" type="text" name="true_name" placeholder="请输入姓名" value="{{$item['true_name']}}" max="20">
                        </div>
                        <div class="form-group">
                            <label for="example-text-input">联系电话</label>
                            <input class="form-control" type="text" name="phone" placeholder="请输入联系电话" value="{{$item['phone']}}" max="20">
                        </div>
                        <div class="form-group">
                            <label for="example-text-input"><span style="color:red;">*</span>&nbsp;所属角色</label>
                            <select class="form-control" id="example-select" name="role_id" size="1">
                                <option value="">请选择所属角色</option>
                                @foreach($role_list as $k=>$v)
                                <option value="{{$v['id']}}" <?php if($item['role_id'] == $v['id']){ ?>selected<?php } ?>>{{$v['role_name']}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="form-group">
                            <button class="btn btn-primary submitForm" type="button">保存</button>
                            <button class="btn btn-secondary" type="button" onclick="window.history.back(-1);">返回</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('js')

@endsection